﻿using System.ServiceModel;

namespace DBFile.WcfFileProvider.Interfaces
{
    [ServiceContract(Name="FileProvider", Namespace="http://dbfile.codeplex.com")]
    public interface IFileProvider
    {
        [OperationContract]
        bool Exists(string filename);

        [OperationContract]
        int Copy(string sourceFilename, string destinationFilename, bool overwrite);
                
        [OperationContract]
        int Insert(string filename, byte[] buffer, string contentType, long contentLength, bool overwrite);

        [OperationContract]
        int Update(string filename, byte[] buffer, string contentType, long contentLength);

        [OperationContract]
        int Delete(string filename);

        [OperationContract]
        string[] GetFileNameList();

        [OperationContract]
        DBFile.Core.Impl.DBFileInfo Get(string filename);
    }
}
